<!DOCTYPE html>
<html lang="en">
<head>
    {% load static %}
    <meta charset="UTF-8">
    <title>phoneLogin</title>
    <link rel="stylesheet" href="{% static 'css/register.css' %}">
</head>
<body>
<body background="{% static 'img/wallpaper.jpg' %}" style="background-repeat:no-repeat ;background-size:100% 100%;background-attachment: fixed;">
<form action="/phoneLogin/" method="post">
    {% csrf_token %}
    <h1>登录</h1>
    <p>手机号：<input type="text" name="phone" placeholder="手机号" required></p>
    <p>管理员 <input type="radio" name="identity" value="管理员" required>
        学生 <input type="radio" name="identity" value="学生" required></p>
    <p><input type="submit" name="action" value="发送验证码"></p>
    <p style="font-size: 20px; color: red; padding-left: 60px">
    {% if code %}
        {{ code }}
    {% endif %}
    </p>
    <p></p>
    <p>验证码：<input type="password" name="code" placeholder="验证码"></p>

    <p style="font-size: 20px; color: red; padding-left: 60px">
    {% if err %}
        {{ err }}
    {% endif %}
    </p>
    <p><input type="submit" name="action" value="登录"></p>
    <a href="/login">用账号密码登录！</a>
    <a href="/register">没有账号？请注册</a>
</form>

</body>
</html>